//
//  YMMessage.h
//  YMIM
//
//  Created by reyzhang on 2022/3/18.
//

#import <Foundation/Foundation.h>
#import "YMUserInfo.h"
#import "YMMessageBody.h"

NS_ASSUME_NONNULL_BEGIN

/**
 * IM 发送消息数据模型
 */
@interface YMMessage : NSObject


/**
 * 会话id
 */
@property (nonatomic, strong) NSString *groupId;

/**
 * 发送人用户id
 */
@property (nonatomic, strong) NSString *uid;


/**
 * 接收人用户id
 */
@property (nonatomic, strong) NSString *tid;


/**
 消息来自哪个用户
 */
@property (nonatomic, strong) YMUserInfo *fromUser;


/**
 消息接收用户
 */
@property (nonatomic, strong) YMUserInfo *tarUser;



/**
 消息主体
 */
@property (nonatomic, strong) YMMessageBody *body;



/**
 * 创建消息实例
 */
- (instancetype)initWithGroupId:(NSString *)groupId
                        body:(YMMessageBody *)body
                         ext:(id _Nullable)ext;

@end

NS_ASSUME_NONNULL_END
